package edu.kjxy.day01;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/1/31 13:44
 */
public class MyThread2 extends Thread{
    @Override
    public void run() {
        try {
            for (int i = 0; i < 10; i++) {
                int time = (int) (Math.random() * 1000);
                Thread.sleep(time);
                System.out.println("run=" + Thread.currentThread().getName());
            }
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
